<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Bitwise OR</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.gmp-nextprime.html">gmp_nextprime</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.gmp-perfect-square.html">gmp_perfect_square</a></div>
 <div class="up"><a href="ref.gmp.html">GMP 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.gmp-or" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">gmp_or</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.4, PHP 5)</p><p class="refpurpose"><span class="refname">gmp_or</span> &mdash; <span class="dc-title">Bitwise OR</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.gmp-or-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">resource</span> <span class="methodname"><strong>gmp_or</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$a</code></span>
   , <span class="methodparam"><span class="type">resource</span> <code class="parameter">$b</code></span>
   )</div>

  <p class="para rdfs-comment">
   Calculates bitwise inclusive OR of two GMP numbers.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.gmp-or-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">a</code></em></dt>

     <dd>

      <p class="para">可以是一个 GMP
数据 <span class="type"><span class="type resouce">resouce</span></span>，或一个可以转换为数值的字符串。</p> 
     </dd>

    
    
     <dt>
<em><code class="parameter">b</code></em></dt>

     <dd>

      <p class="para">可以是一个 GMP
数据 <span class="type"><span class="type resouce">resouce</span></span>，或一个可以转换为数值的字符串。</p> 
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.gmp-or-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   GMP 数值<span class="type"><span class="type 资源">资源</span></span>.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.gmp-or-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-3331">
    <p><strong>Example #1 <span class="function"><strong>gmp_or()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$or1&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">gmp_or</span><span style="color: #007700">(</span><span style="color: #DD0000">"0xfffffff2"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"4"</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #0000BB">gmp_strval</span><span style="color: #007700">(</span><span style="color: #0000BB">$or1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">16</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$or2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">gmp_or</span><span style="color: #007700">(</span><span style="color: #DD0000">"0xfffffff2"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"2"</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #0000BB">gmp_strval</span><span style="color: #007700">(</span><span style="color: #0000BB">$or2</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">16</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>以上例程会输出：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
fffffff6
fffffff2
</pre></div>
    </div>
   </div>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.gmp-nextprime.html">gmp_nextprime</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.gmp-perfect-square.html">gmp_perfect_square</a></div>
 <div class="up"><a href="ref.gmp.html">GMP 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
